home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / CIIGSIncludes / AppleTalk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-01  |  46.5 KB  |  1,196 lines  |  [TEXT/MPS ]

  1. /********************************************
  2. ; File: AppleTalk.h
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc.1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************/
  9.  
  10. #ifndef __TYPES__
  11. #include <TYPES.h>
  12. #endif
  13.  
  14. #ifndef __APPLETALK__
  15. #define __APPLETALK__
  16.  
  17.  
  18. /* Command Numbers */
  19. #define atGetInfoCommand 0x0002
  20. #define atGetGlobalCommand 0x0003
  21. #define atInstallTimerCommand 0x0004
  22. #define atRemoveTimerCommand 0x0005
  23. #define atBootCommand 0x0006
  24. #define atCancelTimerCommand 0x0045
  25.  
  26. /* Link Access Protocol Codes */
  27. #define lapWriteCommand 0x0007
  28. #define lapReadBufferCommand 0x0008
  29. #define lapAttachProtCommand 0x0009
  30. #define lapRemoveProtCommand 0x000A
  31.  
  32. /* Datagram Delivery Protocol Codes */
  33. #define ddpOpenSocketCommand 0x000B
  34. #define ddpCloseSocketCommand 0x000C
  35. #define ddpSendDatagramCommand 0x000D
  36.  
  37. /* Name Binding Protocol Codes */
  38. #define nbpRegisterNameCommand 0x000E
  39. #define nbpRemoveNameCommand 0x000F
  40. #define nbpLookupNameCommand 0x0010
  41. #define nbpConfirmNameCommand 0x0011
  42. #define nbpKillCommand 0x0046
  43.  
  44. /* AppleTalk Transaction Protocol Codes */
  45. #define atpSendReqCommand 0x0012
  46. #define atpCancelReqCommand 0x0013
  47. #define atpOpenSocketCommand 0x0014
  48. #define atpCloseSocketCommand 0x0015
  49. #define atpGetReqCommand 0x0016
  50. #define atpSendRespCommand 0x0017
  51. #define atpRelCBCommand 0x0019
  52.  
  53. /* Zone Information Protocol Codes */
  54. #define zipGetMyZoneCommand 0x001A
  55. #define zipGetZoneListCommand 0x001B
  56.  
  57. /* AppleTalk Session Protocol Codes */
  58. #define aspGetParmsCommand 0x001C
  59. #define aspGetStatusCommand 0x001D
  60. #define aspOpenSessionCommand 0x001E
  61. #define aspCloseSessionCommand 0x001F
  62. #define aspCommandCommand 0x0020
  63. #define aspWriteCommand 0x0021
  64.  
  65. /* Printer Access Protocol Codes */
  66. #define papStatusCommand 0x0022
  67. #define papOpenCommand 0x0023
  68. #define papCloseCommand 0x0024
  69. #define papReadCommand 0x0025
  70. #define papWriteCommand 0x0026
  71. #define papUnloadCommand 0x0027
  72.  
  73. /* Remote Print Manager Codes */
  74. #define rpmSetPrinterCommand 0x0028
  75. #define rpmCloseSessionCommand 0x0047
  76. #define rpmFlushSessionCommand 0x0048
  77.  
  78. /* ProDOS Filing Interface Codes */
  79. #define pfiUserPrefixCommand 0x002A
  80. #define pfiLoginCommand 0x002B
  81. #define pfiLoginContCommand 0x002C
  82. #define pfiLogOutCommand 0x002D
  83. #define pfiMountVolCommand 0x002E
  84. #define pfiListSessionsCommand 0x002F
  85. #define pfiTimeZoneCommand 0x0030
  86. #define pfiGetSrcPathCommand 0x0031
  87. #define pfiAccessCommand 0x0032
  88. #define pfiNamingCommand 0x0033
  89. #define pfiConvertTimeCommand 0x0034
  90. #define pfiSetBufferCommand 0x0036
  91. #define pfiHooksCommand 0x0037
  92. #define pfiLogin2Command 0x0038
  93. #define pfiListSessions2Command 0x0039
  94. #define pfiGetSVersionCommand 0x003A
  95.  
  96. /* Error Codes */
  97. #define appleTalkNetError 0x8888 /* AppleTalk Network Error */
  98. #define atInvalidCmdErr 0x0101  /* Invalid command */
  99. #define atMemoryErr 0x0102  /* Heap/memory management error */
  100. #define atTimerNotInstalledErr 0x0103  /* No timer installed error */
  101. #define atSyncErr 0x0104  /* Syncronous only call */
  102. #define atTooManyTimes 0x0105  /* Too many times */
  103. #define atTimerCancelled 0x0106
  104.  
  105. /* LAP Error Codes */
  106. #define lapNoPacketErr 0x0201  /* No packet in buffer */
  107. #define lapEOBErr 0x0202  /* End of buffer */
  108. #define lapLenErr 0x0203  /* LAP data too large */
  109. #define lapFailedErr 0x0204  /* Retry count exhausted */
  110. #define lapTypeErr 0x0205  /* Illegal LAP type */
  111. #define lapDuplicateErr 0x0206  /* Duplicate LAP type */
  112. #define lapProtocolErr 0x0207  /* Too many protocols */
  113. #define lapTypeFoundErr 0x0208  /* Type not found */
  114. #define lapDataLostErr 0x0209  /* Data lost in Purge */
  115.  
  116. /* DDP Error Codes */
  117. #define ddpSktNumErr 0x0301  /* Too many sockets open */
  118. #define ddpSktErr 0x0302  /* Socket not open */
  119. #define ddpSktOpenErr 0x0303  /* Socket already open */
  120. #define ddpSktTypeErr 0x0304  /* Invalid Socket Type */
  121. #define ddpLenErr 0x0305  /* DDP length error */
  122. #define ddpBridgeErr 0x0306  /* No bridge available */
  123.  
  124. /* NBP Error Codes */
  125. #define nbpNameNumberErr 0x0401  /* Too many names */
  126. #define nbpNameExistErr 0x0402  /* Name already exists */
  127. #define nbpNameFoundErr 0x0403  /* Name not found */
  128. #define nbpBufferErr 0x0404  /* User buffer full */
  129. #define nbpWildcardErr 0x0405  /* Wildcard not allowed */
  130. #define nbpNameErr 0x0406  /* Invalid name format */
  131. #define nbpAddressErr 0x0407  /* Incorrect address */
  132. #define nbpProcessErr 0x0408  /* Too many NBP processes */
  133. #define nbpAbortErr 0x0409  /* NBP Aborted */
  134. #define nbpParmBlkNotFndErr 0x040A  /* NBP Param Block not found */
  135.  
  136. /* ATP Error Codes */
  137. #define atpDataLenErr 0x0501  /* ATP data too large */
  138. #define atpSocketErr 0x0502  /* Invalid ATP socket */
  139. #define atpControlBlkErr 0x0503  /* ATP control block not found */
  140. #define atpProcessErr 0x0504  /* Too many active ATP calls */
  141. #define atpReleaseErr 0x0505  /* No release received */
  142. #define atpNoRespActive 0x0506  /* No response active */
  143. #define atpRespErr 0x0507  /* No send response active */
  144. #define atpReqErr 0x0508  /* ATP send request aborted */
  145. #define atpSktClosedErr 0x0509  /* socket closed error */
  146. #define atpTooManySkts 0x050A  /* Too many ATP sockets */
  147. #define atpTooManyResp 0x050B  /* Too many responses expected */
  148. #define atpDDPSktErr 0x050C  /* Unable to open DDP socket */
  149. #define atpSndRespRelErr 0x050D  /* ATP Send Response was released */
  150.  
  151. /* ZIP Error Codes */
  152. #define zipNetworkErr 0x0601  /* Network error */
  153. #define zipOverflow 0x0602  /* ZIP overflow */
  154. #define zipNotFound 0x0603  /* ZIP not found */
  155.  
  156. /* ASP Error Codes */
  157. #define aspNetworkErr 0x0701  /* Network error */
  158. #define aspSessNumErr 0x0702  /* Too many sessions */
  159. #define aspRefErr 0x0703  /* Invalid reference number */
  160. #define aspSizeErr 0x0704  /* Size error */
  161. #define aspBufErr 0x0705  /* Buffer error */
  162. #define aspNoRespErr 0x0706  /* No response from server */
  163. #define aspBadVersion 0x0707  /* Bad version number */
  164. #define aspTooManySessions 0x0708  /* Too many sessions */
  165. #define aspServBusyErr 0x0709  /* Server busy */
  166. #define aspSessionClosed 0x070A  /* Session closed */
  167.  
  168. /* PAP Error Codes */
  169. #define papSessNumErr 0x0801  /* Too many sessions */
  170. #define papRefErr 0x0802  /* Invalid Reference */
  171. #define papQuantumErr 0x0803  /* Quantum Error */
  172. #define papCommandErr 0x0804  /* Too many commands */
  173. #define papNameErr 0x0805  /* Name not found */
  174. #define papSessionErr 0x0806  /* Session closed */
  175. #define papNetworkErr 0x0807  /* Network error */
  176. #define papServRespErr 0x0808  /* Server not responding */
  177. #define papServBusyErr 0x0809  /* Server busy */
  178. #define papBuffSizeErr 0x080A  /* Buffer size error */
  179. #define papInUseErr 0x080B  /* PAP in use */
  180.  
  181. /* RPM Error Codes */
  182. #define rpmInvalidFlagErr 0x0901
  183. #define rpmInvalidTimeErr 0x0902
  184.  
  185. /* PFI Error Codes */
  186. #define pfiTooManySessErr 0x0A01  /* Too many sessions */
  187. #define pfiUnableOpenSessErr 0x0A02  /* Unable to open session */
  188. #define pfiNoRespFrmSrvrErr 0x0A03  /* No response from server */
  189. #define pfiLoginContErr 0x0A04  /* Login continue */
  190. #define pfiInvalidNameErr 0x0A05  /* Invalid name */
  191. #define pfiInvalidSessNumErr 0x0A06  /* Invalid Sess reference # or unknown volume */
  192. #define pfiUnableOpenVolErr 0x0A07  /* Unable to open volume */
  193. #define pfiTooManyVolsOpenErr 0x0A08  /* Too many mounted volumes */
  194. #define pfiVolNotMountedErr 0x0A09  /* Volume Not Mounted */
  195. #define pfiUnableSetCreatorErr 0x0A0A
  196. #define pfiBufferToSmallErr 0x0A0B  /* Buffer to small */
  197. #define pfiTimeFlagErr 0x0A0C  /* Time flag error */
  198. #define pfiUnableTSetGroupErr 0x0A0D  /* Unable to set group */
  199. #define pfiDirNotFoundErr 0x0A0E  /* Directory not found */
  200. #define pfiAccessDeniedErr 0x0A0F  /* Access denied */
  201. #define pfiMiscellaneousErr 0x0A10  /* Miscellaneous error */
  202. #define pfiVolAlreadyMntedErr 0x0A11  /* Volume already mounted */
  203. #define pfiUnableGetCreatorErr 0x0A12  /* Unable to get creator/group */
  204. #define pfiAlrdyLggedOnSrvrErr 0x0A13  /* Already logged onto server */
  205. #define pfiTimeError 0x0A14  /* Time error */
  206. #define pfiUserNotAuthorizedErr 0x0A15  /* User not authorized */
  207. #define pfiParamterErr 0x0A16  /* Parameter error */
  208. #define pfiSrvrGoingDownErr 0x0A17  /* Server going down */
  209. #define pfiBadUAMErr 0x0A18  /* Bad UAM */
  210. #define pfiBadVersionNumErr 0x0A19  /* Bad version number */
  211.  
  212. /* ATInit offsets */
  213. #define atInitUserName 0x0085  /* 133 */
  214. #define atInitPrinterFlags 0x0064  /* 100 */
  215. #define atInitPrinterTuple 0x0063  /* 99 */
  216. #define atInitPrefix 0x00C6  /* 198 */
  217. #define atInitPrefixDirID 0x00CA  /* 202 */
  218. #define atInitPrefixVolID 0x00CC  /* 204 */
  219. #define atInitPath 0x010D  /* 269 */
  220. #define atInitPathDirID 0x0111  /* 273 */
  221. #define atInitPathVolID 0x0113  /* 275 */
  222.  
  223. /* ATGetInfoRec.hardwareID flags */
  224. #define hidAppleIIGS 0x0000
  225.  
  226. /* ATInstallTimerRec.ticksToComplete values  */
  227. #define atMaxTicks 0xFFFF
  228. #define atMaxTicksIIe 0x1FFF
  229.  
  230. /* LAPReadBufferRec.purge values */
  231. #define lapPurgeOff 0x0000
  232. #define lapPurgeOn 0x0001
  233.  
  234. /* DDPSendDatagramRec.checksum values */
  235. #define ddpChecksumOff 0x00
  236. #define ddpChecksumOn 0x01
  237.  
  238. /* NBPRegsterNameRec.checkFlag values */
  239. #define nbpCheckNameOn 0x00
  240. #define nbpCheckNameOff 0x01
  241.  
  242. /*
  243.     ATPSendReqRec.atpFlags and 
  244.     ATPGetReqRec.atpFlags values
  245. */
  246.  
  247. #define atpExactlyOnceMask 0x20
  248.  
  249. /* ATPSendReqRec.result value (low byte) */
  250. #define atpExecuting 0xFF
  251.  
  252. /* ATPOpenSocketRec.socketID values */
  253. #define atpDynamicSocket 0x00
  254.  
  255. /* ASPAttenHeaderRec.attenType values */
  256. #define aspAttenNormal 0x00
  257. #define aspAttenTimeout 0x40
  258. #define aspAttenClosed 0x80
  259.  
  260. /* RPMSetPrinterRec.timeOut values */
  261. #define rpmTimeOutOff 0x0000
  262.  
  263. /* RPMSetPrinterRec.rpmFlags masks */
  264. #define rpmNetworkMask 0x80
  265. #define rpmPostscriptMask 0x20
  266. #define rpmReturnNameMask 0x01
  267.  
  268. /* PFIMountVolRec.mountFlag masks */
  269. #define pfiMountMask 0x80
  270. #define pfiPasswordMask 0x40
  271. #define pfiUserVolumeMask 0x01
  272.  
  273. /* PFITimeZoneRec.timeFlag masks */
  274. #define pfiEastWestMask 0x80
  275. #define pfiHoursAwayMask 0x7F
  276.  
  277. /* PFIAccessRec.directionalFlag masks */
  278. #define pfiSetAccessMask 0x80
  279. #define pfiCreatorMask 0x40
  280. #define pfiGroupMask 0x20
  281.  
  282. /* PFINamingRec masks */
  283. #define pfiDNCMask 0x80  /* PFI Directional Naming Convention Mask */
  284. #define pfiDDTMask 0x40  /* PFI Directional Device Table Mask */
  285. #define pfiNNCMask 0x80  /* PFI Naming Naming Convention Mask */
  286. #define pfiNDTMask 0x40  /* PFI Naming Device Table Mask */
  287.  
  288. /* LAPAttachProtRec.protType values */
  289. #define lapProtTypeMin 0x01
  290. #define lapProtTypeMax 0x7F
  291. #define lapProtTypeAll 0xFF
  292.  
  293. /* Socket Range values */
  294. #define atpSocketDynamicMin 0x80
  295. #define atpSocketDynamicMax 0xFE
  296. #define atpSocketStaticMin 0x01
  297. #define atpSocketStaticMax 0x7F
  298.  
  299. /* Buffer length constants */
  300. #define zipGetMyZoneBufLenMin 0x21  /* 33 */
  301. #define papOpenStatusBufLenMin 0x0104  /* 260 */
  302. #define pfiUserNameLenMax 0x0040  /* 64 */
  303.  
  304. /* Other misc constants */
  305. #define workstationGS 0x0000
  306. #define endOfBDS 0xFFFF
  307. #define ddpInvalidClient 0x00
  308. #define atpActualLengthMask 0x7FFF
  309. #define atpActualLengthOvflw 0x8000
  310. #define atpUnusedAddRtnPtr 0x00000000L
  311. #define atpUnusedAddBitMap 0x00
  312. #define pfiAFPVersion11 0x0101
  313. #define pfiAFPVersion20 0x0200
  314. #define pfiAFPTimeFormat 0x0000
  315. #define pfiProDOSTimeFormat 0x0001
  316. #define pfiHooksSetHooks 0x40
  317. #define pfiHooksP8Active 0x80
  318. #define pfiSetWriteBuffer 0x80
  319. #define papReadNotEOF 0x00
  320.  
  321. /* TYPES */
  322.  
  323. struct EntName {
  324.    Byte buffer[99]; /*   */
  325. } ;
  326. typedef struct EntName EntName;
  327.  
  328. /* embedded EntName fields */
  329.  
  330. typedef Str32 objStr;
  331. typedef Str32 typeStr;
  332. typedef Str32 zoneStr;
  333.  
  334. typedef char GetMyZoneBuf[zipGetMyZoneBufLenMin];
  335. typedef char PAPOpenStatusBuf[papOpenStatusBufLenMin];
  336. typedef char PFIUserName[pfiUserNameLenMax];
  337.  
  338. struct ATInitTailRec {
  339.    Word pathVolID; /*   */
  340.    LongWord pathDirID; /*   */
  341.    char path[65]; /*   */
  342.    Word prefixVolID; /*   */
  343.    LongWord prefixDirID; /*   */
  344.    char prefix[65]; /*   */
  345.    char userName[33]; /*   */
  346.    Byte printerFlags; /*   */
  347.    Byte printerTuple[99]; /*   */
  348. } ;
  349. typedef struct ATInitTailRec ATInitTailRec, *ATInitTailRecPtr, **ATInitTailRecHndl;
  350.  
  351. struct ATGetInfoRec {
  352.    Byte async;
  353.    Byte command;
  354.    Word result;
  355.    LongWord completionRtn;
  356.    Word thisNet;
  357.    Byte aBridge;
  358.    Byte hardwareID;
  359.    Word romVersion;
  360.    Byte nodeNumber;
  361. } ;
  362. typedef struct ATGetInfoRec ATGetInfoRec, *ATGetInfoRecPtr, **ATGetInfoRecHndl;
  363.  
  364. struct ATGetGlobalRec {
  365.    Byte async;
  366.    Byte command;
  367.    Word result;
  368.    Ptr bufferPtr;
  369. } ;
  370. typedef struct ATGetGlobalRec ATGetGlobalRec, *ATGetGlobalRecPtr, **ATGetGlobalRecHndl;
  371.  
  372. struct ATGetGlobalBuffer {
  373.    Byte destinationNode;
  374.    Byte lapSourceNode;
  375.    Byte lapType;
  376.    Byte hopCountDL;
  377.    Byte datagramLength;
  378.    Word ddpChecksum;
  379.    Word destNetwork;
  380.    Word sourceNetwork;
  381.    Byte destinationNode;
  382.    Byte sourceNode;
  383.    Byte destinationSocket;
  384.    Byte sourceSocket;
  385.    Byte ddpType;
  386.    Word packetLength;
  387. } ;
  388. typedef struct ATGetGlobalBuffer ATGetGlobalBuffer, *ATGetGlobalBufferPtr, **ATGetGlobalBufferHndl;
  389.  
  390. struct ATInstallTimerRec {
  391.    Byte async;
  392.    Byte command;
  393.    Word result;
  394.    LongWord completionRtn;
  395.    Word runningTickCount;
  396.    Word ticksToComplete;
  397.    Pointer reserved;
  398. } ;
  399. typedef struct ATInstallTimerRec ATInstallTimerRec, *ATInstallTimerRecPtr, **ATInstallTimerRecHndl;
  400.  
  401. struct ATRemoveTimerRec {
  402.    Byte async;
  403.    Byte command;
  404.    Word result;
  405.    Byte reserved[12];
  406. } ;
  407. typedef struct ATRemoveTimerRec ATRemoveTimerRec, *ATRemoveTimerRecPtr, **ATRemoveTimerRecHndl;
  408.  
  409. struct ATBootRec {
  410.    Byte async;
  411.    Byte command;
  412.    Word result;
  413. } ;
  414. typedef struct ATBootRec ATBootRec, *ATBootRecPtr, **ATBootRecHndl;
  415.  
  416. struct ATCancelTimerRec {
  417.    Byte async;
  418.    Byte command;
  419.    Word result;
  420.    Byte reserved[12];
  421. } ;
  422. typedef struct ATCancelTimerRec ATCancelTimerRec, *ATCancelTimerRecPtr, **ATCancelTimerRecHndl;
  423.  
  424. struct ASPAttentionHeaderRec {
  425.    Byte sessionRefNum; /*   */
  426.    Byte attenType; /*   */
  427.    Word atten; /*   */
  428. } ;
  429. typedef struct ASPAttentionHeaderRec ASPAttentionHeaderRec, *ASPAttentionHeaderRecPtr, **ASPAttentionHeaderRecHndl;
  430.  
  431. struct ASPGetParmsRec {
  432.    Byte async; /* asyncronous flag */
  433.    Byte command; /* PAP command to execute */
  434.    Word result; /* error result from a PAP operation */
  435.    Word maxCmdSize;
  436.    Word maxDataSize;
  437. } ;
  438. typedef struct ASPGetParmsRec ASPGetParmsRec, *ASPGetParmsRecPtr, **ASPGetParmsRecHndl;
  439.  
  440. struct ASPGetStatusRec {
  441.    Byte async; /* asyncronous flag */
  442.    Byte command; /* PAP command to execute */
  443.    Word result; /* error result from a PAP operation */
  444.    LongWord completionPtr; /* pointer to the completion routine */
  445.    Word slsNet; /* SLS Network Number */
  446.    Byte slsNode; /* SLS Node Number */
  447.    Byte slsSocket; /* SLS Socket Number */
  448.    Word bufferLength; /* Buffer Length */
  449.    LongWord bufferAddr; /* Buffer Address */
  450.    Word dataLength; /* Length of Status Data */
  451. } ;
  452. typedef struct ASPGetStatusRec ASPGetStatusRec, *ASPGetStatusRecPtr, **ASPGetStatusRecHndl;
  453.  
  454. struct ASPOpenSessionRec {
  455.    Byte async; /* asyncronous flag */
  456.    Byte command; /* PAP command to execute */
  457.    Word result; /* error result from a PAP operation */
  458.    LongWord completionPtr; /* pointer to the completion routine */
  459.    Word slsNet; /* SLS Network Number */
  460.    Byte slsNode; /* SLS Node Number */
  461.    Byte slsSocket; /* SLS Socket Number */
  462.    LongWord attnRtnAddr; /* Attention Routine Addr */
  463.    Byte refNum; /* Session Reference Number */
  464. } ;
  465. typedef struct ASPOpenSessionRec ASPOpenSessionRec, *ASPOpenSessionRecPtr, **ASPOpenSessionRecHndl;
  466.  
  467. struct ASPCloseSessionRec {
  468.    Byte async; /* asyncronous flag */
  469.    Byte command; /* PAP command to execute */
  470.    Word result; /* error result from a PAP operation */
  471.    LongWord completionPtr; /* pointer to the completion routine */
  472.    Byte refNum; /* Session Reference Number */
  473. } ;
  474. typedef struct ASPCloseSessionRec ASPCloseSessionRec, *ASPCloseSessionRecPtr, **ASPCloseSessionRecHndl;
  475.  
  476. struct ASPCommandRec {
  477.    Byte async; /* asyncronous flag */
  478.    Byte command; /* PAP command to execute */
  479.    Word result; /* error result from a PAP operation */
  480.    LongWord completionPtr; /* pointer to the completion routine */
  481.    Byte refNum; /* Session Reference Number */
  482.    Word cmdBlkLength; /* Command Block Length */
  483.    LongWord cmdBlkAddr; /* Command Block Address */
  484.    Word replyBufferLen; /* Reply Buffer Length */
  485.    LongWord replyBufferAddr; /* Reply Buffer Address */
  486.    LongWord cmdResult; /* Command Result */
  487.    Word replyLength; /* Reply Length */
  488. } ;
  489. typedef struct ASPCommandRec ASPCommandRec, *ASPCommandRecPtr, **ASPCommandRecHndl;
  490.  
  491. struct ASPWriteRec {
  492.    Byte async; /* asyncronous flag */
  493.    Byte command; /* PAP command to execute */
  494.    Word result; /* error result from a PAP operation */
  495.    LongWord completionPtr; /* pointer to the completion routine */
  496.    Byte refNum; /* Session Reference Number */
  497.    Word cmdBlkLength; /* Command Block Length */
  498.    LongWord cmdBlkAddr; /* Command Block Address */
  499.    Word writeDataLength; /* Write Data Length */
  500.    LongWord writeDataAddr; /* Write Data Address */
  501.    Word replyBufferLen; /* Reply Buffer Length */
  502.    LongWord replyBufferAddr; /* Reply Buffer Address */
  503.    LongWord cmdResult; /* Command Result */
  504.    Word writtenLength; /* Written Length */
  505.    Word replyLength; /* Reply Length */
  506. } ;
  507. typedef struct ASPWriteRec ASPWriteRec, *ASPWriteRecPtr, **ASPWriteRecHndl;
  508.  
  509. struct Server {
  510.    Pointer serverName; /* Pointer to a Server Entity */
  511.    Word net; /* Net of the server */
  512.    Byte node; /* Node of the server */
  513.    Byte socket; /* Socket number of the server */
  514. } ;
  515. typedef struct Server Server, *ServerPtr, **ServerHndl;
  516.  
  517. struct ATPSendReqRec {
  518.    Byte async; /* asyncronous flag */
  519.    Byte command; /* ATP command to execute */
  520.    Word result; /* error result from the ATP operation */
  521.    LongWord completionPtr; /* pointer to the completion routine */
  522.    Byte socketID; /* dynamic socket number */
  523.    Word destNetID; /* destination network # */
  524.    Byte destNodeID; /* destination node # */
  525.    Byte destSocketID; /* destination socket # */
  526.    Word transactionID; /* transaction ID # */
  527.    Word reqBufferLength; /* request buffer length */
  528.    LongWord reqBufferPtr; /* pointer to the request buffer */
  529.    LongWord userBytes; /* user BYTEs */
  530.    Byte numRespBuffers; /* number of response buffers */
  531.    LongWord respBufferPtr; /* pointer to the response buffer */
  532.    Byte atpFlags; /* flags for ATP transaction */
  533.    Byte rInterval; /* timeout before retrying */
  534.    Byte rCount; /* number of retries to attempt */
  535.    Byte bitMap; /* bitmap indicating for packet reception */
  536.    Byte responseRcv; /* number of responses received */
  537.    Byte reserved; /* reserved for future use */
  538. } ;
  539. typedef struct ATPSendReqRec ATPSendReqRec, *ATPSendReqRecPtr, **ATPSendReqRecHndl;
  540.  
  541. struct ATPCancelReqRec {
  542.    Byte async; /* asyncronous flag */
  543.    Byte command; /* ATP command to execute */
  544.    Word result; /* error result from ATP operation */
  545.    Word transactionID; /* transaction ID # */
  546. } ;
  547. typedef struct ATPCancelReqRec ATPCancelReqRec, *ATPCancelReqRecPtr, **ATPCancelReqRecHndl;
  548.  
  549. struct ATPOpenSocketRec {
  550.    Byte async; /* asyncronous flag */
  551.    Byte command; /* ATP command to execute */
  552.    Word result; /* error result from the ATP operation */
  553.    Byte socketID; /* socket number to open */
  554. } ;
  555. typedef struct ATPOpenSocketRec ATPOpenSocketRec, *ATPOpenSocketRecPtr, **ATPOpenSocketRecHndl;
  556.  
  557. struct ATPCloseSocketRec {
  558.    Byte async; /* asyncronous flag */
  559.    Byte command; /* ATP command to execute */
  560.    Word result; /* error result from ATP operation */
  561.    Byte socketID; /* socket number for closing */
  562. } ;
  563. typedef struct ATPCloseSocketRec ATPCloseSocketRec, *ATPCloseSocketRecPtr, **ATPCloseSocketRecHndl;
  564.  
  565. struct ATPGetReqRec {
  566.    Byte async; /* asyncronous flag */
  567.    Byte command; /* ATP command to execute */
  568.    Word result; /* error result from ATP operation */
  569.    LongWord completionPtr; /* pointer to the completion routine */
  570.    Byte respSocketID; /* response socket # */
  571.    Word networkID; /* source network # */
  572.    Byte nodeID; /* source node # */
  573.    Byte socketID; /* source socket # */
  574.    Word transactionID; /* ATP transaction ID */
  575.    Word reqBufferLength; /* request buffer length */
  576.    LongWord reqBufferPtr; /* pointer to request buffer */
  577.    LongWord userBytes; /* user BYTEs */
  578.    Word requestLength; /* actual request length */
  579.    Byte atpFlags; /* ATP operation flags */
  580.    Byte bitMap; /* bitmap for packet reception */
  581.    LongWord reserved; /* reserved for future use */
  582. } ;
  583. typedef struct ATPGetReqRec ATPGetReqRec, *ATPGetReqRecPtr, **ATPGetReqRecHndl;
  584.  
  585. struct ATPSendRespRec {
  586.    Byte async; /* asyncronous flag */
  587.    Byte command; /* ATP command to execute */
  588.    Word result; /* result to the ATP operation */
  589.    LongWord completionPtr; /* pointer to the completion routine */
  590.    Byte socketID; /* response socket # */
  591.    Word destNetID; /* destination network # */
  592.    Byte destNodeID; /* destination node # */
  593.    Byte destSocketID; /* destination socket # */
  594.    Word transactionID; /* transaction ID # */
  595.    Byte numRespBuffers; /* number of response buffers */
  596.    Byte totalPackets; /* total ATP packets */
  597.    LongWord respBDSPtr; /* pointer to the BDS buffer */
  598.    Byte atpFlags; /* ATP operation flags */
  599.    Byte bitmap; /* bitmap for packet reception */
  600.    LongWord reserved; /* must be set to NIL for future compatibility */
  601.    Byte reserved2; /* must be set to 0 for future compatibility */
  602. } ;
  603. typedef struct ATPSendRespRec ATPSendRespRec, *ATPSendRespRecPtr, **ATPSendRespRecHndl;
  604.  
  605. struct ATPRelCBRec {
  606.    Byte async; /* asyncronous flag */
  607.    Byte command; /* ATP command to execute */
  608.    Word result; /* error result to the ATP operation */
  609.    Byte socketID; /* response socket # */
  610.    Word destNetID; /* destination network # */
  611.    Byte destNodeID; /* destination node # */
  612.    Byte destSocketID; /* destination socket # */
  613.    Word transactionID; /* ATP transaction ID */
  614. } ;
  615. typedef struct ATPRelCBRec ATPRelCBRec, *ATPRelCBRecPtr, **ATPRelCBRecHndl;
  616.  
  617. struct RespBDSBuffer {
  618.    Word bufferLength;
  619.    LongWord bufferPtr;
  620.    LongWord userBytes;
  621.    Word actualLength;
  622. } ;
  623. typedef struct RespBDSBuffer RespBDSBuffer, *RespBDSBufferPtr, **RespBDSBufferHndl;
  624.  
  625. struct DDPOpenSocketRec {
  626.    Byte async; /* asyncronous flag */
  627.    Byte command; /* DDP command to execute */
  628.    Word result; /* error result from DDP operation */
  629.    Byte socketNumber; /* socket number opened */
  630.    LongWord clientAddr; /* client address */
  631. } ;
  632. typedef struct DDPOpenSocketRec DDPOpenSocketRec, *DDPOpenSocketRecPtr, **DDPOpenSocketRecHndl;
  633.  
  634. struct DDPCloseSocketRec {
  635.    Byte async; /* asyncronous flag */
  636.    Byte command; /* DDP commnd to execute */
  637.    Word result; /* error result from DDP operation */
  638.    Byte socketNumber; /* socket # to close */
  639. } ;
  640. typedef struct DDPCloseSocketRec DDPCloseSocketRec, *DDPCloseSocketRecPtr, **DDPCloseSocketRecHndl;
  641.  
  642. struct DDPSendDatagramRec {
  643.    Byte async; /* asyncronous flag */
  644.    Byte command; /* DDP command to execute */
  645.    Word result; /* error result from DDP operation */
  646.    Byte checksum; /* calculated checksum */
  647.    Word destNet; /* destination network # */
  648.    Byte destNode; /* destination node # */
  649.    Byte destSocket; /* destination socket # */
  650.    Byte sourceSocket; /* DDP socket to send from */
  651.    Byte ddpType; /* DDP protocol type */
  652.    LongWord bdsPtr; /* pointer to the DDP BDS buffer */
  653. } ;
  654. typedef struct DDPSendDatagramRec DDPSendDatagramRec, *DDPSendDatagramRecPtr, **DDPSendDatagramRecHndl;
  655.  
  656. struct LAPWriteRec {
  657.    Byte async; /* asyncronous flag */
  658.    Byte command; /* lap command to execute */
  659.    Word result; /* lap error result code */
  660.    Byte destNode; /* destination node to send packet to */
  661.    Byte lapType; /* lap protocol type to send */
  662.    LongWord lapBDSPtr; /* pointer to the lap BDS buffer */
  663. } ;
  664. typedef struct LAPWriteRec LAPWriteRec, *LAPWriteRecPtr, **LAPWriteRecHndl;
  665.  
  666. struct LAPReadBufferRec {
  667.    Byte async; /* asyncronous flag */
  668.    Byte command; /* LAP command to execute */
  669.    Word result; /* error result of the LAP operation */
  670.    Word requestCount; /* how many BYTEs to transfer */
  671.    LongWord bufferPtr; /* pointer to a buffer to store info */
  672.    Byte purge; /* flag for purging the buffer if wrong size */
  673.    Word amountTransfered; /* actual amount transfered */
  674. } ;
  675. typedef struct LAPReadBufferRec LAPReadBufferRec, *LAPReadBufferRecPtr, **LAPReadBufferRecHndl;
  676.  
  677. struct LAPAttachProtRec {
  678.    Byte async; /* asyncronous flag */
  679.    Byte command; /* LAP command to execute */
  680.    Word result; /* error result of LAP operation */
  681.    Byte protType; /* protocol type specifing the LAP type */
  682.    LongWord protAddr; /* protocol address specifing the LAP handler */
  683. } ;
  684. typedef struct LAPAttachProtRec LAPAttachProtRec, *LAPAttachProtRecPtr, **LAPAttachProtRecHndl;
  685.  
  686. struct LAPRemoveProtRec {
  687.    Byte async; /* asyncronous flag */
  688.    Byte command; /* LAP command to execute */
  689.    Word result; /* error result of LAP operation */
  690.    Byte protType; /* protocol type specifing the LAP type */
  691. } ;
  692. typedef struct LAPRemoveProtRec LAPRemoveProtRec, *LAPRemoveProtRecPtr, **LAPRemoveProtRecHndl;
  693.  
  694. struct BDS {
  695.    Word BufferLength;
  696.    LongWord BufferPtr;
  697. } ;
  698. typedef struct BDS BDS, *BDSPtr, **BDSHndl;
  699.  
  700. struct NBPRNEntityNameRec {
  701.    Byte reserved[9]; /*   */
  702.    EntName entityName; /*   */
  703. } ;
  704. typedef struct NBPRNEntityNameRec NBPRNEntityNameRec, *NBPRNEntityNameRecPtr, **NBPRNEntityNameRecHndl;
  705.  
  706. struct NBPLUNameBufferRec {
  707.    Word netNum; /*   */
  708.    Byte nodeNum; /*   */
  709.    Byte socketNum; /*   */
  710.    Byte enumerator; /*   */
  711.    EntName entityName; /*   */
  712. } ;
  713. typedef struct NBPLUNameBufferRec NBPLUNameBufferRec, *NBPLUNameBufferRecPtr, **NBPLUNameBufferRecHndl;
  714.  
  715. struct NBPRegisterNameRec {
  716.    Byte async; /* asyncronous flag */
  717.    Byte command; /* NBP command to execute */
  718.    Word result; /* error result from NBP operation */
  719.    LongWord completionPtr; /* pointer to the completion routine */
  720.    LongWord namePtr; /* pointer to the entityType */
  721.    Byte rInterval; /* timeOut period before retrying */
  722.    Byte rCount; /* number of retries to attempt */
  723.    Word reserved; /* reserved for future use */
  724.    Byte socketNumber; /* socket listner being registered */
  725.    Byte checkFlag; /* flag for checking duplicate names */
  726. } ;
  727. typedef struct NBPRegisterNameRec NBPRegisterNameRec, *NBPRegisterNameRecPtr, **NBPRegisterNameRecHndl;
  728.  
  729. struct NBPRemoveNameRec {
  730.    Byte async; /* asyncronous flag */
  731.    Byte command; /* NBP command to execute */
  732.    Word result; /* error result from NBP operation */
  733.    LongWord entityPtr; /* pointer to the entity entityType */
  734. } ;
  735. typedef struct NBPRemoveNameRec NBPRemoveNameRec, *NBPRemoveNameRecPtr, **NBPRemoveNameRecHndl;
  736.  
  737. struct NBPLookupNameRec {
  738.    Byte async; /* asyncronous flag */
  739.    Byte command; /* NBP command to execute */
  740.    Word result; /* error result from NBP operation */
  741.    LongWord completionPtr; /* pointer to the completion routine */
  742.    LongWord entityPtr; /* pointer to the entity entityType */
  743.    Byte rInterval; /* timeout interval before retrying */
  744.    Byte rCount; /* number of retries to attempt */
  745.    Word reserved; /* reserved for future use */
  746.    Word bufferLength; /* length of the user buffer */
  747.    LongWord bufferPtr; /* pointer to the user buffer */
  748.    Byte maxMatch; /* maxiumn number of name matches */
  749.    Byte actualMatch; /* actual number of matches */
  750. } ;
  751. typedef struct NBPLookupNameRec NBPLookupNameRec, *NBPLookupNameRecPtr, **NBPLookupNameRecHndl;
  752.  
  753. struct NBPConfirmNameRec {
  754.    Byte async; /* asyncronous flag */
  755.    Byte command; /* NBP command to execute */
  756.    Word result; /* error result from NBP operation */
  757.    LongWord completionPtr; /* pointer to the completion routine */
  758.    LongWord entityPtr; /* pointer to the entity name */
  759.    Byte rInterval; /* timeout interval before retrying */
  760.    Byte rCount; /* number of retries to attempt */
  761.    Word reserved; /* reserved for future use */
  762.    Word networkID; /* network number for confirmation */
  763.    Byte nodeID; /* node number for confirmation */
  764.    Byte socketID; /* socket number for confirmation */
  765.    Byte actualSocketID; /* actual socket number confirmed */
  766. } ;
  767. typedef struct NBPConfirmNameRec NBPConfirmNameRec, *NBPConfirmNameRecPtr, **NBPConfirmNameRecHndl;
  768.  
  769. struct NBPKillRec {
  770.    Byte async;
  771.    Byte command;
  772.    Word result;
  773.    Pointer paramBlockPtr;
  774. } ;
  775. typedef struct NBPKillRec NBPKillRec, *NBPKillRecPtr, **NBPKillRecHndl;
  776.  
  777. struct PAPStatusRec {
  778.    Byte async; /* asyncronous flag */
  779.    Byte command; /* PAP command to execute */
  780.    Word result; /* error result from a PAP operation */
  781.    LongWord completionPtr; /* pointer to the completion routine */
  782.    LongWord printerNamePtr; /* pointer to the printer name */
  783.    LongWord statusBufferPtr; /* pointer to the status buffer */
  784. } ;
  785. typedef struct PAPStatusRec PAPStatusRec, *PAPStatusRecPtr, **PAPStatusRecHndl;
  786.  
  787. struct PAPOpenRec {
  788.    Byte async; /* asyncronous flag */
  789.    Byte command; /* PAP command to execute */
  790.    Word result; /* error result from a PAP operation */
  791.    LongWord completionPtr; /* pointer to the completion routine */
  792.    Byte sessRefID; /* session reference number */
  793.    LongWord printerNamePtr; /* printer name pointer */
  794.    Byte flowQuantum; /* number of ATP packets to be sent */
  795.    LongWord statusBufferPtr; /* pointer to the status buffer */
  796. } ;
  797. typedef struct PAPOpenRec PAPOpenRec, *PAPOpenRecPtr, **PAPOpenRecHndl;
  798.  
  799. struct PAPCloseRec {
  800.    Byte async; /* asyncronous flag */
  801.    Byte command; /* PAP command to execute */
  802.    Word result; /* error result from a PAP operation */
  803.    LongWord completionPtr; /* pointer to the completion routine */
  804.    Byte sessRefID; /* session referance number */
  805. } ;
  806. typedef struct PAPCloseRec PAPCloseRec, *PAPCloseRecPtr, **PAPCloseRecHndl;
  807.  
  808. struct PAPReadRec {
  809.    Byte async; /* asyncronous flag */
  810.    Byte command; /* PAP command to execute */
  811.    Word result; /* error result from a PAP operation */
  812.    LongWord completionPtr; /* pointer to the completion routine */
  813.    Byte sessRefID; /* session reference # */
  814.    Word bufferLength; /* length of the user buffer */
  815.    LongWord bufferPtr; /* pointer to the user buffer */
  816.    Byte papEOF; /* end of file flag */
  817. } ;
  818. typedef struct PAPReadRec PAPReadRec, *PAPReadRecPtr, **PAPReadRecHndl;
  819.  
  820. struct PAPWriteRec {
  821.    Byte async; /* asyncronous flag */
  822.    Byte command; /* PAP command to execute */
  823.    Word result; /* error result from a PAP operation */
  824.    LongWord completionPtr; /* pointer to the completion routine */
  825.    Byte sessRefID; /* session reference # */
  826.    Word dataLength; /* data length */
  827.    LongWord bufferPtr; /* pointer to the buffer */
  828.    Byte papEOF; /* end of file flag */
  829. } ;
  830. typedef struct PAPWriteRec PAPWriteRec, *PAPWriteRecPtr, **PAPWriteRecHndl;
  831.  
  832. struct PAPUnloadRec {
  833.    Byte async; /* asyncronous flag */
  834.    Byte command; /* PAP command to execute */
  835.    Word result; /* error result from a PAP operation */
  836.    LongWord completionPtr; /* pointer to the completion routine */
  837. } ;
  838. typedef struct PAPUnloadRec PAPUnloadRec, *PAPUnloadRecPtr, **PAPUnloadRecHndl;
  839.  
  840. struct PFIAttentionHeaderRec {
  841.    Byte sessionRefNum;
  842.    Byte attenType;
  843.    Word atten;
  844.    char serverName[33];
  845.    char zoneName[34];
  846. } ;
  847. typedef struct PFIAttentionHeaderRec PFIAttentionHeaderRec, *PFIAttentionHeaderRecPtr, **PFIAttentionHeaderRecHndl;
  848.  
  849. struct PFIHooksMountingRec {
  850.    Byte sessionRefNum;
  851.    Byte p8UnitNum;
  852.    char volumeName[29];
  853.    Word volumeID;
  854.    char serverName[33];
  855.    char zoneName[34];
  856. } ;
  857. typedef struct PFIHooksMountingRec PFIHooksMountingRec, *PFIHooksMountingRecPtr, **PFIHooksMountingRecHndl;
  858.  
  859. struct PFIUserPrefixRec {
  860.    Byte async; /* asyncronous flag */
  861.    Byte command; /* PFI command to execute */
  862.    Word result; /* error result from PFI operation */
  863.    Byte directionFlag; /* high bit set to point to by User Pointer is stored in PFI */
  864.    Word userNamePtr; /* name pointed to my User Mane Pointer */
  865. } ;
  866. typedef struct PFIUserPrefixRec PFIUserPrefixRec, *PFIUserPrefixRecPtr, **PFIUserPrefixRecHndl;
  867.  
  868. struct PFILoginRec {
  869.    Byte async; /* asyncronous flag */
  870.    Byte command; /* PFI command to execute */
  871.    Word result; /* error result from PFI operation */
  872.    Word networkID; /* network number for confirmation */
  873.    Byte nodeID; /* node number for confirmation */
  874.    Byte socketID; /* socket number for confirmation */
  875.    Word cmdBufferLength; /* length of the user command buffer */
  876.    LongWord cmdBufferPtr; /* pointer to the user command buffer */
  877.    Word replyBufferLen; /* length of the reply buffer */
  878.    LongWord replyBufferPtr; /* pointer to the reply buffer */
  879.    Byte sessRefID; /* session reference number */
  880.    LongWord attnRtnAddr;
  881. } ;
  882. typedef struct PFILoginRec PFILoginRec, *PFILoginRecPtr, **PFILoginRecHndl;
  883.  
  884. struct PFILoginContRec {
  885.    Byte async; /* asyncronous flag */
  886.    Byte command; /* PFI command to execute */
  887.    Word result; /* error result from PFI operation */
  888.    Byte sessRefID; /* session reference number */
  889.    Word cmdBufferLength; /* length of the user command buffer */
  890.    LongWord cmdBufferPtr; /* pointer to the user command buffer */
  891.    Word replyBufferLen; /* length of the reply buffer */
  892.    LongWord replyBufferPtr; /* pointer to the reply buffer */
  893. } ;
  894. typedef struct PFILoginContRec PFILoginContRec, *PFILoginContRecPtr, **PFILoginContRecHndl;
  895.  
  896. struct PFILogoutRec {
  897.    Byte async; /* asyncronous flag */
  898.    Byte command; /* PFI command to execute */
  899.    Word result; /* error result from PFI operation */
  900.    Byte sessRefID; /* session reference number */
  901. } ;
  902. typedef struct PFILogoutRec PFILogoutRec, *PFILogoutRecPtr, **PFILogoutRecHndl;
  903.  
  904. struct PFIMountvolRec {
  905.    Byte async; /* asyncronous flag */
  906.    Byte command; /* PFI command to execute */
  907.    Word result; /* error result from PFI operation */
  908.    Byte sessRefID; /* session reference number */
  909.    Byte mountflag; /* mount flag field specifies whether the vol is to be mounted */
  910.    LongWord volNamePtr; /* pointer to the volume that will be pseudo-mounted */
  911.    Word volID; /* volume ID returned by AFP */
  912.    Byte slotDrive; /* the slot/drive in ProDOS format into which the volume was pseudo-mounted */
  913.    LongWord passwordPtr; /* pointer to password for the pseudo-mounted volume */
  914. } ;
  915. typedef struct PFIMountvolRec PFIMountvolRec, *PFIMountvolRecPtr, **PFIMountvolRecHndl;
  916.  
  917. struct PFIListBufferRec {
  918.    Byte sessionRefNum;
  919.    Byte Slot;
  920.    Byte volumeName[28];
  921.    Word volumeID;
  922. } ;
  923. typedef struct PFIListBufferRec PFIListBufferRec, *PFIListBufferRecPtr, **PFIListBufferRecHndl;
  924.  
  925. struct PFIListSessionsRec {
  926.    Byte async; /* asyncronous flag */
  927.    Byte command; /* PFI command to execute */
  928.    Word result; /* error result from PFI operation */
  929.    Word bufferLength; /* length of the user buffer */
  930.    LongWord bufferPtr; /* pointer to the user buffer */
  931.    Byte entriesRtn; /* contains the number of entries returned from the list of current sessions being maintained through the PFI and any volumes mounted for those sessions */
  932. } ;
  933. typedef struct PFIListSessionsRec PFIListSessionsRec, *PFIListSessionsRecPtr, **PFIListSessionsRecHndl;
  934.  
  935. struct PFITimeZoneRec {
  936.    Byte async; /* asyncronous flag */
  937.    Byte command; /* PFI command to execute */
  938.    Word result; /* error result from PFI operation */
  939.    Byte timeFlag; /* depending on bit set of the time falg field indicates whether the time should be added to or subtracted from the time zone selected */
  940. } ;
  941. typedef struct PFITimeZoneRec PFITimeZoneRec, *PFITimeZoneRecPtr, **PFITimeZoneRecHndl;
  942.  
  943. struct PFIGetSrcpathRec {
  944.    Byte async; /* asyncronous flag */
  945.    Byte command; /* PFI command to execute */
  946.    Word result; /* error result from PFI operation */
  947.    LongWord bufferPtr; /* pointer to the user buffer where the pathname will be placed */
  948. } ;
  949. typedef struct PFIGetSrcpathRec PFIGetSrcpathRec, *PFIGetSrcpathRecPtr, **PFIGetSrcpathRecHndl;
  950.  
  951. struct PFIAccessRec {
  952.    Byte async; /* asyncronous flag */
  953.    Byte command; /* PFI command to execute */
  954.    Word result; /* error result from PFI operation */
  955.    Byte directionalFlag; /* if bit 7 of the directional flag is set, the access is being set */
  956.    LongWord accessRights; /* access rights in AFP format */
  957.    LongWord pathnamePtr; /* pointer the path name containing that volume */
  958.    LongWord creatorNamePtr; /* if bit 6 of the directional flag is set, the creator's name will be dealt with */
  959.    LongWord groupNamePtr; /* if bit 5 of the directional flag is set, the group name will be dealt with */
  960. } ;
  961. typedef struct PFIAccessRec PFIAccessRec, *PFIAccessRecPtr, **PFIAccessRecHndl;
  962.  
  963. struct PFINamingRec {
  964.    Byte async; /* asyncronous flag */
  965.    Byte command; /* PFI command to execute */
  966.    Word result; /* error result from PFI operation */
  967.    Byte directionalFlag; /* if bit 7 of the directional flag is set, the naming convention is being set */
  968.    Byte namingConvFlag; /* if bit 7 of the naming convention flag is set, the naming convention becomes AFP format */
  969. } ;
  970. typedef struct PFINamingRec PFINamingRec, *PFINamingRecPtr, **PFINamingRecHndl;
  971.  
  972. struct PFIConvertTimeRec {
  973.    Byte async; /* asyncronous flag */
  974.    Byte command; /* PFI command to execute */
  975.    Word result; /* error result from PFI operation */
  976.    Byte formatFlag; /* if the format flag is set to 0, then from date time is AFP format  if the format flag is set to 1, then from date time is ProDOS format */
  977.    LongWord fromDateTime; /* this field contains the From DATE/Time data (values) to convert, not pointers */
  978.    LongWord toDateTime; /* this field contains the TO DATE/Time data (values) to convert, not pointers */
  979. } ;
  980. typedef struct PFIConvertTimeRec PFIConvertTimeRec, *PFIConvertTimeRecPtr, **PFIConvertTimeRecHndl;
  981.  
  982. struct PFISetBufferRec {
  983.    Byte async; /* asyncronous flag */
  984.    Byte command; /* PFI command to execute */
  985.    Word result; /* error result from PFI operation */
  986.    Byte dirFlag; /* $00 or $80 */
  987.    Word bufferLength; /* Buffer Length */
  988.    LongWord bufferPtr; /* if the format flag is set to 0, then from date time is AFP format */
  989. } ;
  990. typedef struct PFISetBufferRec PFISetBufferRec, *PFISetBufferRecPtr, **PFISetBufferRecHndl;
  991.  
  992. struct PFIHooksRec {
  993.    Byte async; /*   */
  994.    Byte command; /*   */
  995.    Word result; /*   */
  996.    Byte hookFlag; /*   */
  997.    LongWord mountVector; /*   */
  998.    LongWord unmountVector; /*   */
  999.    LongWord attentionVector; /*   */
  1000. } ;
  1001. typedef struct PFIHooksRec PFIHooksRec, *PFIHooksRecPtr, **PFIHooksRecHndl;
  1002.  
  1003. struct PFILogin2Rec {
  1004.    Byte async;
  1005.    Byte command; /*   */
  1006.    Word result; /*   */
  1007.    Word networkID; /*   */
  1008.    Byte nodeID; /*   */
  1009.    Byte socketID; /*   */
  1010.    Word cmdBufferLength; /*   */
  1011.    LongWord cmdBufferPtr; /*   */
  1012.    Word replyBufferLen; /*   */
  1013.    LongWord replyBufferPtr; /*   */
  1014.    Byte sessRefID; /*   */
  1015.    LongWord attnRtnAddr; /*   */
  1016.    Pointer serverName; /*   */
  1017.    Pointer zoneName; /*   */
  1018.    Word afpVersionNum; /*   */
  1019. } ;
  1020. typedef struct PFILogin2Rec PFILogin2Rec, *PFILogin2RecPtr, **PFILogin2RecHndl;
  1021.  
  1022. struct PFIListSessions2Rec {
  1023.    Byte async; /*   */
  1024.    Byte command; /*   */
  1025.    Word result; /*   */
  1026.    Word bufferLength; /*   */
  1027.    LongWord bufferPtr; /*   */
  1028.    Byte entriesRtn; /*   */
  1029. } ;
  1030. typedef struct PFIListSessions2Rec PFIListSessions2Rec, *PFIListSessions2RecPtr, **PFIListSessions2RecHndl;
  1031.  
  1032. struct PFIGetSVersionRec {
  1033.    Byte async; /*   */
  1034.    Byte command; /*   */
  1035.    Word result; /*   */
  1036.    Byte sessRefID; /*   */
  1037.    Word afpVersionNum; /*   */
  1038. } ;
  1039. typedef struct PFIGetSVersionRec PFIGetSVersionRec, *PFIGetSVersionRecPtr, **PFIGetSVersionRecHndl;
  1040.  
  1041. struct ListSessionsBuffer {
  1042.    Byte refNum;
  1043.    Byte slotDrive;
  1044.    char volName[28];
  1045.    Word volID;
  1046. } ;
  1047. typedef struct ListSessionsBuffer ListSessionsBuffer, *ListSessionsBufferPtr, **ListSessionsBufferHndl;
  1048.  
  1049. struct RPMSetPrinterRec {
  1050.    Byte async; /* asyncronous flag */
  1051.    Byte command; /* RPM command to execute */
  1052.    Word result; /* error code returned from RPM operation */
  1053.    LongWord entityPtr; /* pointer to the entity name */
  1054.    Byte rpmFlags; /* RPM operation flags */
  1055.    Word flushInterval; /* flush interval */
  1056.    Word timeOut; /* timeOut */
  1057.    Word numberBuffers; /* number of buffers allocated */
  1058. } ;
  1059. typedef struct RPMSetPrinterRec RPMSetPrinterRec, *RPMSetPrinterRecPtr, **RPMSetPrinterRecHndl;
  1060.  
  1061. struct RPMCloseSessionRec {
  1062.    Byte async;
  1063.    Byte command;
  1064.    Word result;
  1065. } ;
  1066. typedef struct RPMCloseSessionRec RPMCloseSessionRec, *RPMCloseSessionRecPtr, **RPMCloseSessionRecHndl;
  1067.  
  1068. struct RPMFlushSessionRec {
  1069.    Byte async;
  1070.    Byte command;
  1071.    Byte result;
  1072. } ;
  1073. typedef struct RPMFlushSessionRec RPMFlushSessionRec, *RPMFlushSessionRecPtr, **RPMFlushSessionRecHndl;
  1074.  
  1075. struct ZIPGetMyZoneRec {
  1076.    Byte async; /* asyncronous flag */
  1077.    Byte command; /* ZIP Command to execute */
  1078.    Word result; /* error result from a ZIP operation */
  1079.    LongWord completionPtr; /* Pointer to the completion routine */
  1080.    LongWord bufferPtr; /* pointe to the buffer */
  1081.    Byte timeOut; /* timeout interval for retrying */
  1082.    Byte retry; /* number of retries to attempt */
  1083.    Word reserved; /* reserved for future use */
  1084. } ;
  1085. typedef struct ZIPGetMyZoneRec ZIPGetMyZoneRec, *ZIPGetMyZoneRecPtr, **ZIPGetMyZoneRecHndl;
  1086.  
  1087. struct ZIPGetZoneListRec {
  1088.    Byte async; /* asyncronous flag */
  1089.    Byte command; /* ZIP command to execute */
  1090.    Word result; /* error result from a ZIP operation */
  1091.    LongWord completionPtr; /* pointer to the completion routine */
  1092.    Word bufferLength; /* length of the user buffer */
  1093.    LongWord bufferPtr; /* pointer to the user buffer */
  1094.    Byte bridgeNodeID; /* bridge node number */
  1095.    Word startIndex; /* starting index of the buffer */
  1096.    Byte timeOut; /* timeout interval for retrying */
  1097.    Byte retry; /* number of retries to attempt */
  1098.    Word zonesFound; /* number of zones found */
  1099.    Word reserved; /* reserved for future use (not clear in manual) */
  1100. } ;
  1101. typedef struct ZIPGetZoneListRec ZIPGetZoneListRec, *ZIPGetZoneListRecPtr, **ZIPGetZoneListRecHndl;
  1102.  
  1103. struct CmdBlock {
  1104.    Word cmdLength; /* AFP Command Length */
  1105.    Pointer cmdBlkAddr; /* Address of AFP Command */
  1106.    Word replyLength; /* Size of Reply Buffer */
  1107.    Pointer replyBuffer; /* Address of Reply Buffer */
  1108.    Word writeLength; /* Size of Data to be written */
  1109.    Pointer writeBuffer; /* Address of Write Buffer */
  1110. } ;
  1111. typedef struct CmdBlock CmdBlock, *CmdBlockPtr, **CmdBlockHndl;
  1112.  
  1113.  
  1114. /*
  1115.     Causes packet and timer interrupts to be buffered without
  1116.     being dispatched.  Use with completion routines, socket
  1117.     listeners, and in place of disabling interrupts.
  1118. */
  1119. extern pascal void RamForbid() inline(0,0xE11018);
  1120.  
  1121.  
  1122. /*
  1123.     Reenables packet and timer interrupts. 
  1124.     Call after RamForbid.
  1125. */
  1126. extern pascal void RamPermit() inline(0,0xE1101C);
  1127.  
  1128.  
  1129. /*
  1130.     AppleTalk calls return result value of type OSErr.
  1131.     This value is valid only for calls that are made syncronously.
  1132. */
  1133.  
  1134. extern OSErr _CALLAT();
  1135.  
  1136. OSErr ASPCloseSession(pBlockPtr) ASPCloseSessionRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1137. OSErr ASPCommand(pBlockPtr) ASPCommandRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1138. OSErr ASPGetParms(pBlockPtr) ASPGetParmsRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1139. OSErr ASPGetStatus(pBlockPtr) ASPGetStatusRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1140. OSErr ASPOpenSession(pBlockPtr) ASPOpenSessionRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1141. OSErr ASPWrite(pBlockPtr) ASPWriteRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1142. OSErr ATBoot(pBlockPtr) ATBootRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1143. OSErr ATCancelTimer(pBlockPtr) ATCancelTimerRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1144. OSErr ATGetGlobal(pBlockPtr) ATGetGlobalRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1145. OSErr ATGetInfo(pBlockPtr) ATGetInfoRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1146. OSErr ATInstallTimer(pBlockPtr) ATInstallTimerRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1147. OSErr ATPCancelReq(pBlockPtr) ATPCancelReqRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1148. OSErr ATPCloseSocket(pBlockPtr) ATPCloseSocketRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1149. OSErr ATPGetReq(pBlockPtr) ATPGetReqRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1150. OSErr ATPOpenSocket(pBlockPtr) ATPOpenSocketRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1151. OSErr ATPRelCB(pBlockPtr) ATPRelCBRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1152. OSErr ATPSendReq(pBlockPtr) ATPSendReqRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1153. OSErr ATPSendResp(pBlockPtr) ATPSendRespRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1154. OSErr ATRemoveTimer(pBlockPtr) ATInstallTimerRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1155. OSErr DDPCloseSocket(pBlockPtr) DDPCloseSocketRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1156. OSErr DDPOpenSocket(pBlockPtr) DDPOpenSocketRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1157. OSErr DDPSendDatagram(pBlockPtr) DDPSendDatagramRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1158. OSErr LAPAttachProt(pBlockPtr) LAPAttachProtRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1159. OSErr LAPReadBuffer(pBlockPtr) LAPReadBufferRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1160. OSErr LAPRemoveProt(pBlockPtr) LAPRemoveProtRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1161. OSErr LAPWrite(pBlockPtr) LAPWriteRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1162. OSErr NBPConfirmName(pBlockPtr) NBPConfirmNameRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1163. OSErr NBPKill(pBlockPtr) NBPKillRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1164. OSErr NBPLookupName(pBlockPtr) NBPLookupNameRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1165. OSErr NBPRegisterName(pBlockPtr) NBPRegisterNameRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1166. OSErr NBPRemoveName(pBlockPtr) NBPRemoveNameRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1167. OSErr PAPClose(pBlockPtr) PAPCloseRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1168. OSErr PAPOpen(pBlockPtr) PAPOpenRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1169. OSErr PAPRead(pBlockPtr) PAPReadRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1170. OSErr PAPStatus(pBlockPtr) PAPStatusRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1171. OSErr PAPUnload(pBlockPtr) PAPUnloadRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1172. OSErr PAPWrite(pBlockPtr) PAPWriteRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1173. OSErr PFIAccess(pBlockPtr) PFIAccessRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1174. OSErr PFIConvertTime(pBlockPtr) PFIConvertTimeRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1175. OSErr PFIGetSrcPath(pBlockPtr) PFIGetSrcpathRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1176. OSErr PFIGetSVersion(pBlockPtr) PFIGetSVersionRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1177. OSErr PFIHooks(pBlockPtr) PFIHooksRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1178. OSErr PFIListSessions(pBlockPtr) PFIListSessionsRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1179. OSErr PFIListSessions2(pBlockPtr) PFIListSessions2Rec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1180. OSErr PFILogin(pBlockPtr) PFILoginRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1181. OSErr PFILogin2(pBlockPtr) PFILogin2Rec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1182. OSErr PFILoginCont(pBlockPtr) PFILoginContRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1183. OSErr PFILogOut(pBlockPtr) PFILogoutRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1184. OSErr PFIMountVol(pBlockPtr) PFIMountvolRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1185. OSErr PFINaming(pBlockPtr) PFINamingRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1186. OSErr PFISetBuffer(pBlockPtr) PFISetBufferRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1187. OSErr PFITimeZone(pBlockPtr) PFITimeZoneRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1188. OSErr PFIUserPrefix(pBlockPtr) PFIUserPrefixRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1189. OSErr RPMCloseSession(pBlockPtr) RPMCloseSessionRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1190. OSErr RPMFlushSession(pBlockPtr) RPMFlushSessionRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1191. OSErr RPMSetPrinter(pBlockPtr) RPMSetPrinterRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1192. OSErr ZIPGetMyZone(pBlockPtr) ZIPGetMyZoneRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1193. OSErr ZIPGetZoneList(pBlockPtr) ZIPGetZoneListRec* pBlockPtr; { return(_CALLAT(pBlockPtr)); }
  1194.  
  1195. #endif
  1196.